home *** CD-ROM | disk | FTP | other *** search
/ PC Play 129 / pc play 129.iso / Demo / man2 / man2.exe / data / scripts / experimental_explosion.lua < prev    next >
Encoding:
Text File  |  2006-02-27  |  1.6 KB  |  54 lines

  1.  
  2. function effects_explosion_fire()
  3.     local explosion = uniGetExecutor()
  4.     explosion:setTransformOwner()
  5.     local dummy = explosion:addSimpleEffect(ENET_EFFECT_DUMMY)
  6.     local stone = dummy:addSimpleEffect(ENET_EFFECT_DUMMY)
  7.     stone:setLocalPosition(5,0,0)
  8.     local smoke = stone:addSimpleEffect(ENET_EFFECT_PS_BIGROCKETENGINE)
  9.     dummy:addRotationEffect(ENET_EFFECT_ROTATE_SPIRAL,MATH_PI * 10)
  10. --    waitDeath(explosion:addMoveEffect(ENET_EFFECT_MOVE_LINEARFLY,200,uniGetTarget()))
  11.     waitDeath(explosion:addMoveEffect(ENET_EFFECT_MOVE_GRAVITYPARABOLA,200,uniGetTarget()))
  12.     smoke:suspendedDestroy(2.0)
  13.     pause(2.0)
  14.     explosion:destroy()
  15. end
  16.  
  17. registerCommand(ENSCRIPTSET_EXPLOSION,ENC_FIRE1,"effects_explosion_fire")
  18.  
  19. --
  20. -- dummy effect creation test
  21. --
  22. desc = getEffectDescriptionP(ENET_EFFECT_EXPLOSION_TEST)
  23. desc.ClassID = ENCLASS_DUMMY
  24. desc.EffectClassType = ENECT_GEOMETRY
  25.  
  26. desc.ScriptSet = ENSCRIPTSET_EXPLOSION
  27. desc.RelativePosition = ENLOCALPOS_NOTSPECIFIED
  28. local vzbzd1 = D3DXVECTOR3:new(0,0,0)
  29. desc.LocalPosition = vzbzd1
  30. vzbzd1:delete()
  31. desc.MoveType = ENMOVE_FLY
  32.  
  33. desc.ActivityType = ENACT_COMMANDSEMIACTIVE
  34. --
  35. -- end dummy effect creation test
  36. --
  37.  
  38. --
  39. -- dummy effect creation test
  40. --
  41. desc = getEffectDescriptionP(ENET_EFFECT_DUMMY)
  42. desc.ClassID = ENCLASS_DUMMY
  43. desc.EffectClassType = ENECT_GEOMETRY
  44. desc.ScriptSet = ENSCRIPTSET_UNKNOWN
  45. desc.RelativePosition = ENLOCALPOS_NOTSPECIFIED
  46. local vzbzd2 = D3DXVECTOR3:new(0,0,0)
  47. desc.LocalPosition = vzbzd2
  48. vzbzd2:delete()
  49. desc.MoveType = ENMOVE_FLY
  50. desc.ActivityType = ENACT_ACTIVE
  51. --
  52. -- end dummy effect creation test
  53. --
  54.